package com.ywu.role.spi.spi;

import com.ywu.common.result.CommonResult;
import com.ywu.role.spi.dto.ApiRoleAuthDto;
import com.ywu.role.spi.dto.MenuRoleAuthDto;
import com.ywu.role.spi.dto.UserRoleAuthDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "YWU-ROLE")
public interface UserRoleAuthSpi {
    @PostMapping("/ywu/role/auth/user.role.info")
    CommonResult<Object> queryUserRoleInfo(@RequestBody UserRoleAuthDto userRoleAuthDto);

    @PostMapping("/ywu/role/auth/api.role.info")
    CommonResult<Object> queryApiRoleInfo(@RequestBody ApiRoleAuthDto apiRoleAuthDto);

    @PostMapping("/ywu/role/auth/user.role.auth.delete.info")
    CommonResult<Object> userRoleAuthDeleteInfo(@RequestBody List<UserRoleAuthDto> userRoleAuthDtos);

    @PostMapping("/ywu/role/auth/menu.role.auth.delete.info")
    CommonResult<Object> menuRoleAuthDeleteInfo(@RequestBody MenuRoleAuthDto menuRoleAuthDto);

    @PostMapping("/ywu/role/auth/api.role.auth.delete.info")
    CommonResult<Object> apiRoleAuthDeleteInfo(@RequestBody ApiRoleAuthDto apiRoleAuthDto);
}
